import axios from "@/axios.js"

// 新增文章
export function articleAdd(data) {
    return axios.post("/admin/article/publish", data)
}

// 分页查询文章
export function articlequeryByPage(data) {
    return axios.post("/admin/article/query/page", data)
}


// 删除文章
export function articleDel(id) {
    return axios.delete(`/admin/article/delete/${id}`)
}


// 文章详情查询
export function articleDetail(id) {
    return axios.get(`/admin/article/detail/${id}`)
}


// 修改文章
export function articleUpdate(data) {
    return axios.post("/admin/article/update", data)
}

export function setArticleTop(id) {
    return axios.get(`/admin/article/set/top/${id}`)
}

export function unsetArticleTop(id) {
    return axios.get(`/admin/article/unset/top/${id}`)
}
